import request from '@/utils/request'

// 导出员工信息
export const exportEmployeeInfo = (data) => {
  return request({
    url: '/v2/personnel/excel',
    method: 'POST',
    data
  })
}

// 人事档案数据统计
export const dataStatistics = () => {
  return request({
    url: '/v2/statistics/personnel',
    method: 'GET'
  })
}

export function getAllLeaders(data) {
  return request({
    url: `/v2/basic/leaders`,
    method: 'get',
    params: data
  })
}

// 获取所有员工信息
export const getAllUser = (params) => {
  return request({
    url: '/v2/user/all',
    method: 'GET',
    params
  })
}

// 管理员查看人事档案详情
export const getPersonnelDetails = (params) => {
  return request({
    url: '/v2/personnel/view/administrator',
    method: 'GET',
    params
  })
}

// 管理员修改人事档案
export const administratorModifyFile = (data) => {
  return request({
    url: '/v2/personnel/update/administrator',
    method: 'POST',
    data
  })
}

// 下载申请表
export const exportEntry = (params) => {
  return request({
    url: '/v2/user/entry/table',
    method: 'GET',
    params
  })
}
